home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -coverdisks- / 133a / palettedeck / palettedeck.z < prev    next >
Text File  |  1999-12-01  |  15KB  |  631 lines

  1. Deck "PaletteDeck"
  2.     Routine "Quit"
  3.         Do "Get_TOOLTYPES"
  4.         Let X=WindowX,Y=WindowY,W=WindowWidth,H=WindowHeight
  5.         If X<>WinX
  6.             Let CP=True
  7.         EndIf
  8.         If Y<>WinY
  9.             Let CP=True
  10.         EndIf
  11.         If W<>WinW
  12.             Let CP=True
  13.         EndIf
  14.         If H<>WinH
  15.             Let CP=True
  16.         EndIf
  17.         If CP=True
  18.             Do "SaveIcon"
  19.         EndIf
  20.         Quit
  21.     EndScript
  22.     Routine "Get_GFX.PREFS"
  23.         WorkWithDocument "TEMP"
  24.         Clear DOCUMENT 
  25.         InsertMessagePortList
  26.         MoveCursorTo STARTOF DOCUMENT 
  27.         SplitLine
  28.         MoveCursorTo STARTOF DOCUMENT 
  29.         SearchFor "CYBERGRAPHICS.LIBRARY",BYWORD NOCASE 
  30.         If SearchFound
  31.             Let CYBERGFX=TRUE,DBLHEIGHT=TRUE,DBLWIDTH=TRUE
  32.         Else
  33.             Let CYBERGFX=FALSE
  34.         EndIf
  35.     EndScript
  36.     Routine "IN_Case.WinX"
  37.         Let WinX=Limit(0,ScreenWidth,Arg1)
  38.     EndScript
  39.     Routine "IN_Case.WinY"
  40.         Let WinY=Limit(0,ScreenHeight,Arg1)
  41.     EndScript
  42.     Routine "IN_Case.WinH"
  43.         Let WinH=Limit(177,ScreenHeight,Arg1)
  44.     EndScript
  45.     Routine "IN_Case.WinW"
  46.         Let WinW=Limit(376,ScreenWidth,Arg1)
  47.     EndScript
  48.     Routine "GetColors"
  49.         Let I=0
  50.         Loop
  51.             GetRGB I,R[I],G[I],B[I]
  52.             Let I=I+1
  53.         Until I>MaxColor
  54.     EndScript
  55.     Routine "ResetColors"
  56.         Let I=0
  57.         Loop
  58.             SetRGB I,R[I],G[I],B[I]
  59.             Let I=I+1
  60.         Until I>MaxColor
  61.         Do "SetProps"
  62.     EndScript
  63.     Routine "Box"
  64.         Let Row=PenA%8
  65.         Let Column=PenA//8
  66.         Let Top=StartY+Row*IncY-1
  67.         Let Left=StartX+Column*IncX-1
  68.         Let APen=PenA
  69.         SetPen Arg1
  70.         DrawBorder Left,Top+1,IncX,IncY-1,BEVEL ,Arg1,2
  71.         DrawBorder Left+3,Top+3,IncX-6,IncY-5,OUTLINE ,0,0
  72.         SetPen APen
  73.     EndScript
  74.     Routine "SetProps"
  75.         Let APen=PenA
  76.         SetPen 1
  77.         GetRGB APen,Red,Green,Blue
  78.         Do "PrintPropPos"
  79.         SetPropPosition "Prop_R",Red
  80.         SetPropPosition "Prop_G",Green
  81.         SetPropPosition "Prop_B",Blue
  82.         SetPen APen
  83.     EndScript
  84.     Routine "PropRelease"
  85.         Let APen=PenA
  86.         SetPen 1
  87.         Do "PrintPropPos"
  88.         SetPen APen
  89.         Let PendingCommand="None"
  90.     EndScript
  91.     Routine "Get_FONT.PREFS"
  92.         Local READFILE="ENV:sys/font.prefs",X=0,SizeVar="",FontVar=""
  93.         If EXISTS(READFILE)=TRUE
  94.             IfError
  95.                 Let SysDefText="topaz",SysDefTextSize=8
  96.             Else
  97.                 If FileSize(READFILE)>""
  98.                     GetFileInfo READFILE,FILECNT
  99.                     SetFileBufferSize Limit(1,1024,Integer(FILECNT%1024))
  100.                     OpenFile READFILE,"WORKFILE",READONLY ,OLDFILE 
  101.                     FileReadChars "WORKFILE",X,223
  102.                     FileReadChars "WORKFILE",SizeVar,1,HEX 
  103.                     FileReadChars "WORKFILE",X,2
  104.                     FileReadChars "WORKFILE",FontVar,30
  105.                     Let SysDefTextSize=HexToInteger(SizeVar)
  106.                     Let SysDefText=GetWord(FontVar,1,".")
  107.                     Close "WORKFILE"
  108.                 Else
  109.                     Let SysDefText="topaz",SysDefTextSize=8
  110.                 EndIf
  111.             EndIf
  112.         Else
  113.             Let SysDefText="topaz",SysDefTextSize=8
  114.         EndIf
  115.         GetFontInfo SCREEN ,ScreenText,ScreenTextSize
  116.         Let GOS=ScreenTextSize+3
  117.     EndScript
  118.     Routine "DrawPalette"
  119.         Let MaxColor=WindowColors-1
  120.         Let NumRows=WindowColors%8
  121.         If NumRows=0
  122.             Let NumRows=1
  123.             Let NumCols=WindowColors
  124.         Else
  125.             Let NumCols=8
  126.         EndIf
  127.         Let StartX=11
  128.         Let StartY=34
  129.         Let IncX=(WinW-111)/NumCols
  130.         Let IncY=(WinH-110)/NumRows
  131.         Let I=0
  132.         Let J=0
  133.         Let X=0
  134.         Let Y=0
  135.         Loop
  136.             Loop
  137.                 SetPen I+J*NumCols
  138.                 AreaRectangle StartX+X,StartY+Y,IncX-1,IncY-1
  139.                 Let I=I+1
  140.                 Let X=X+IncX
  141.             Until I=NumCols
  142.             Let I=0
  143.             Let J=J+1
  144.             Let X=0
  145.             Let Y=Y+IncY
  146.         Until J=NumRows
  147.     EndScript
  148.     Routine "SaveVar"
  149.         Let PalData.WinX=WinX
  150.         Let PalData.WinY=WinY
  151.         Let PalData.WinW=WinW
  152.         Let PalData.WinH=WinH
  153.         SaveVariable PalData,"Ram:Pal.Data"
  154.     EndScript
  155.     Routine "LoadVar"
  156.         If Exists("Ram:Pal.Data")
  157.             Let PalData=LoadVariable("Ram:Pal.Data")
  158.             IfError
  159.                 Let WinX=0,WinY=GOS,WinW=376,WinH=169+SCREENTEXTSIZE
  160.             Else
  161.                 Let WinX=PalData.WinX,WinY=PalData.WinY,WinW=PalData.WinW,WinH=PalData.WinH
  162.             EndIf
  163.         ElseIf Exists(TheCurrentDirectory||"Pal.Data")
  164.             Let PalData=LoadVariable(TheCurrentDirectory||"Pal.Data")
  165.             IfError
  166.                 Let WinX=0,WinY=GOS,WinW=376,WinH=169+SCREENTEXTSIZE
  167.             Else
  168.                 Let WinX=PalData.WinX,WinY=PalData.WinY,WinW=PalData.WinW,WinH=PalData.WinH
  169.             EndIf
  170.         Else
  171.             Do "SaveVar"
  172.         EndIf
  173.     EndScript
  174.     Routine "Get_TOOLTYPES"
  175.         WorkWithDocument "ToolTypes"
  176.         Clear DOCUMENT 
  177.         If Exists(DECKNAME||".info")
  178.             LoadIcon DECKNAME,"ICON"
  179.             IfError
  180.                 Do "LoadVar"
  181.             Else
  182.                 WorkWithDocument "ToolTypes"
  183.                 Clear DOCUMENT 
  184.                 InsertToolTypeList "ICON"
  185.                 MoveCursorTo STARTOF DOCUMENT 
  186.                 If LINESINDOCUMENT>=2
  187.                     Loop
  188.                         If NOT Match(GetChars(THELINE,1,1),"(","[","{","<","«",";")
  189.                             Do "IN_Case."||UpperCase(GetWord(THELINE,1,"=")),UpperCase(GetWord(THELINE,1,"WwIiNnHhXxYy = "))
  190.                             IfError
  191.                             EndIf
  192.                         EndIf
  193.                         MoveCursor DOWN 
  194.                     Until THELINENUMBER=LINESINDOCUMENT
  195.                 EndIf
  196.                 Flush "ICON"
  197.             EndIf
  198.         Else
  199.             Do "LoadVar"
  200.         EndIf
  201.     EndScript
  202.     Routine "SearchFor"
  203.         WorkWithDocument "ToolTypes"
  204.         MoveCursorTo STARTOF DOCUMENT 
  205.         SearchFor Arg1,NOCASE 
  206.         If SearchFound
  207.             Let Word=GetWord(TheLine,1)
  208.             If Word<>Arg1||Arg2
  209.                 If Match(GetChars(Word,1,1),"(","[","{","<","«",";")
  210.                     MoveCursorTo ENDOF DOCUMENT
  211.                 Else
  212.                     Delete LINE
  213.                 EndIf
  214.                 MoveCursorTo ENDOF DOCUMENT 
  215.                 Type Arg1||Arg2,NEWLINE 
  216.             EndIf
  217.         Else
  218.             MoveCursorTo ENDOF DOCUMENT 
  219.             Type Arg1||Arg2,NEWLINE 
  220.         EndIf
  221.     EndScript
  222.     Routine "SaveIcon"
  223.         Do "Get_TOOLTYPES"
  224.         WorkWithDocument "ToolTypes"
  225.         MoveCursorTo STARTOF DOCUMENT 
  226.         Let WinX=WindowX,WinY=WindowY,WinW=WindowWidth,WinH=WindowHeight
  227.         Do "SearchFor","WinX=",WinX
  228.         Do "SearchFor","WinY=",WinY
  229.         Do "SearchFor","WinW=",WinW
  230.         Do "SearchFor","WinH=",WinH
  231.         SetToolTypeList DeckName,"ToolTypes"
  232.         SaveIcon DeckName,DeckName
  233.     EndScript
  234.     Routine "DrawWin"
  235.         SetDrawMode JAM2 
  236.         Let WinW=WindowWidth
  237.         Let WinH=WindowHeight
  238.         Do "DrawPalette"
  239.         DrawBorder WinW-94,16+AY1,72,WinH-(90+AY1),BEVEL ,1,2
  240.         SetPrintFont "topaz",8
  241.         SetPen 1,0
  242.         PrintText "R",8,WinH-68
  243.         PrintText "G",8,WinH-52
  244.         PrintText "B",8,WinH-36
  245.         SetPen 0
  246.         Do "Box",1
  247.         Do "SetProps"
  248.         Do "GetColors"
  249.         Let PendingCommand="None"
  250.     EndScript
  251.     Routine "PrintPropPos"
  252.         SetDrawMode JAM2
  253.         PrintText FormatValue(Red,"000"),WinW-43,WinH-(51+AY1)
  254.         PrintText FormatValue(Green,"000"),WinW-43,WinH-(37+AY1)
  255.         PrintText FormatValue(Blue,"000"),WinW-43,WinH-(21+AY1)
  256.     EndScript
  257.     Routine "ClickColor"
  258.         Do "Box",0
  259.         Do "DrawPalette"
  260.         Let CurX=MouseX
  261.         Let CurY=MouseY
  262.         Let CurRow=Min((CurY-StartY)%IncY+1,NumRows)
  263.         Let CurCol=Min((CurX-StartX)%IncX+1,NumCols)
  264.         Let PenNum=8*(CurRow-1)+(CurCol-1)
  265.         GetRGB PenA,Red,Green,Blue
  266.         If PendingCommand="Copy"
  267.             SetRGB PenNum,Red,Green,Blue
  268.         ElseIf PendingCommand="Exchange"
  269.             GetRGB PenNum,Red2,Green2,Blue2
  270.             SetRGB PenA,Red2,Green2,Blue2
  271.             SetRGB PenNum,Red,Green,Blue
  272.         ElseIf PendingCommand="Spread"
  273.             Let PenDiff=Absolute(PenNum-PenA)
  274.             If PenDiff>1
  275.                 Let StartPen=Min(PenA,PenNum)
  276.                 If StartPen=PenA
  277.                     GetRGB PenA,Red,Green,Blue
  278.                     GetRGB PenNum,Red2,Green2,Blue2
  279.                 Else
  280.                     GetRGB PenNum,Red,Green,Blue
  281.                     GetRGB PenA,Red2,Green2,Blue2
  282.                 EndIf
  283.                 Let RedInc=(Red2-Red)/PenDiff
  284.                 Let GreenInc=(Green2-Green)/PenDiff
  285.                 Let BlueInc=(Blue2-Blue)/PenDiff
  286.                 Let CurPen=StartPen+1
  287.                 While CurPen<=StartPen+PenDiff-1
  288.                     Let NewRed=Red+(CurPen-StartPen)*RedInc
  289.                     Let NewGreen=Green+(CurPen-StartPen)*GreenInc
  290.                     Let NewBlue=Blue+(CurPen-StartPen)*BlueInc
  291.                     SetRGB CurPen,NewRed,NewGreen,NewBlue
  292.                     Let CurPen=CurPen+1
  293.                 EndLoop
  294.             EndIf
  295.         EndIf
  296.         SetPen PenNum
  297.         Let PendingCommand="None"
  298.         AreaRectangle WinW-90,18+AY1,64,WinH-(95+AY1)
  299.         Do "SetProps"
  300.         Do "Box",1
  301.     EndScript
  302.     Resource "PROGRAM"
  303.         BeforeAttachment
  304.             SetAutoFileRequester FALSE
  305.             Do "Get_GFX.PREFS"
  306.             Do "Get_FONT.PREFS"
  307.             Let WinX=0,WinY=GOS,WinW=376,WinH=169+SCREENTEXTSIZE
  308.             If THEPUBSCREENTITLE=""
  309.                 Let THEPUBSCREENTITLE="Workbench"
  310.             Else
  311.                 Let THEPUBSCREENTITLE=Name
  312.             EndIf
  313.             Do "Get_TOOLTYPES"
  314.         EndScript
  315.         AfterAttachment
  316.             SetAutoFileRequester FALSE
  317.             SetSystemRequesterTo WINDOW 
  318.             Let WinBorT=WINDOWBORDERTOP
  319.             Let DBLHEIGHT=IfThen(CYBERGFX=TRUE,TRUE,Interlace)
  320.             Let DBLWIDTH=IfThen(CYBERGFX=TRUE,TRUE,Hires)
  321.             Let Horiz=IfThen(DBLWIDTH=TRUE,8,4)
  322.             Let Vert=IfThen(DBLHEIGHT=TRUE,4,4)
  323.             Let AX1=Horiz+1
  324.             Let AY1=WinBorT+Vert
  325.             AttachObject "OBJECTS"
  326.             Do "DrawWin"
  327.         EndScript
  328.         Window "MainWindow"
  329.             Definition
  330.                 Origin WinX,WinY
  331.                 Title "Palette Deck..."
  332.                 WindowObjects CLOSEBUTTON DEPTHBUTTONS DRAGBAR SIZEBUTTON 
  333.                 WindowLimits 376,169,ScreenWidth,ScreenHeight
  334.                 WindowZoom -1,-1,376,169
  335.                 Size WinW,WinH
  336.                 WindowFlags ACTIVATE TOFRONT PUBLIC ,THEPUBSCREENTITLE
  337.                 VisualEffects NONE ,NONE 
  338.             EndScript
  339.             OnCloseButton
  340.                 Do "Quit"
  341.             EndScript
  342.             OnResized
  343.                 If ObjectAttached("OBJECTS")
  344.                     DetachObject "OBJECTS"
  345.                     ClearWindow
  346.                     AttachObject "OBJECTS"
  347.                 EndIf
  348.                 Do "DrawWin"
  349.             EndScript
  350.         EndObj
  351.         Resource "OBJECTS"
  352.             NoAttach
  353.             BeforeAttachment
  354.                 Let WinW=WindowWidth
  355.                 Let WinH=WindowHeight
  356.             EndScript
  357.             AreaButton "B_Copy"
  358.                 Definition
  359.                     Origin AX1,AY1
  360.                     Border BEVEL ,2,4
  361.                     Text "Copy"
  362.                     Font "topaz",8
  363.                     Size 64,13
  364.                 EndScript
  365.                 OnRelease
  366.                     Let PendingCommand="Copy"
  367.                 EndScript
  368.                 AfterAttachment
  369.                     DrawBorder AX1,AY1,64,13,OUTLINE ,1,1
  370.                 EndScript
  371.             EndObj
  372.             AreaButton "B_Swap"
  373.                 Definition
  374.                     Origin Whole(79+((WinW-376)/2)/2),AY1
  375.                     Border BEVEL ,2,4
  376.                     Text "Swap"
  377.                     Font "topaz",8
  378.                     Size 64,13
  379.                 EndScript
  380.                 OnRelease
  381.                     Let PendingCommand="Exchange"
  382.                 EndScript
  383.                 AfterAttachment
  384.                     DrawBorder Whole(79+((WinW-376)/2)/2),AY1,64,13,OUTLINE ,1,1
  385.                 EndScript
  386.             EndObj
  387.             AreaButton "B_Spread"
  388.                 Definition
  389.                     Origin Whole(149+((WinW-376)/2)),AY1
  390.                     Border BEVEL ,2,4
  391.                     Text "Spread"
  392.                     Font "topaz",8
  393.                     Size 64,13
  394.                 EndScript
  395.                 OnRelease
  396.                     Let PendingCommand="Spread"
  397.                 EndScript
  398.                 AfterAttachment
  399.                     DrawBorder Whole(149+((WinW-376)/2)),AY1,64,13,OUTLINE ,1,1
  400.                 EndScript
  401.             EndObj
  402.             AreaButton "B_Screens"
  403.                 Definition
  404.                     Origin Whole(219+((WinW-376)/2)*5/3),AY1
  405.                     Border BEVEL ,2,4
  406.                     Text "Screens"
  407.                     Font "topaz",8
  408.                     Size 64,13
  409.                 EndScript
  410.                 OnRelease
  411.                     If Not ObjectAttached("Pub")
  412.                         AttachObject "Pub"
  413.                     EndIf
  414.                     WorkWithDocument "PubScreens"
  415.                     Clear DOCUMENT 
  416.                     InsertPubScreenList
  417.                     Delete CHARACTER ,-1
  418.                     MoveCursorTo STARTOF DOCUMENT 
  419.                 EndScript
  420.                 AfterAttachment
  421.                     DrawBorder Whole(219+((WinW-376)/2)*5/3),AY1,64,13,OUTLINE ,1,1
  422.                 EndScript
  423.             EndObj
  424.             AreaButton "B_Restore"
  425.                 Definition
  426.                     Origin WinW-87,AY1
  427.                     Border BEVEL ,2,4
  428.                     Text "Restore"
  429.                     Font "topaz",8
  430.                     Size 64,13
  431.                 EndScript
  432.                 OnRelease
  433.                     Do "ResetColors"
  434.                     Let PendingCommand="None"
  435.                 EndScript
  436.                 AfterAttachment
  437.                     DrawBorder WinW-87,AY1,64,13,OUTLINE ,1,1
  438.                 EndScript
  439.             EndObj
  440.             AreaButton "B_AreaPal"
  441.                 Definition
  442.                     Origin 8,16+AY1
  443.                     Border BEVEL 
  444.                     Highlight NONE 
  445.                     Size WinW-106,WinH-(90+AY1)
  446.                 EndScript
  447.                 OnClick
  448.                     Do "ClickColor"
  449.                 EndScript
  450.             EndObj
  451.             AreaButton "B_Save"
  452.                 Definition
  453.                     Origin AX1,WinH-(5+AY1)
  454.                     Border BEVEL ,2,4
  455.                     Text "Save"
  456.                     Font "topaz",8
  457.                     Size 58,13
  458.                 EndScript
  459.                 OnRelease
  460.                     ClipBrush 21,42,28,11,"PalBrush"
  461.                     SaveBrush "PalBrush",TheCurrentDirectory||"Pal.Prefs"
  462.                 EndScript
  463.                 AfterAttachment
  464.                     DrawBorder AX1,WinH-(5+AY1),58,13,OUTLINE ,1,1
  465.                 EndScript
  466.             EndObj
  467.             AreaButton "B_Use"
  468.                 Definition
  469.                     Origin Whole(152+((WinW-376)/2)),WinH-(5+AY1)
  470.                     Border BEVEL ,2,4
  471.                     Text "Use"
  472.                     Font "topaz",8
  473.                     Size 58,13
  474.                 EndScript
  475.                 OnRelease
  476.                     Do "Quit"
  477.                 EndScript
  478.                 AfterAttachment
  479.                     DrawBorder Whole(152+((WinW-376)/2)),WinH-(5+AY1),58,13,OUTLINE ,1,1
  480.                 EndScript
  481.             EndObj
  482.             AreaButton "B_Cancel"
  483.                 Definition
  484.                     Origin WinW-81,WinH-(5+AY1)
  485.                     Border BEVEL ,2,4
  486.                     Text "Cancel"
  487.                     Font "topaz",8
  488.                     Size 58,13
  489.                 EndScript
  490.                 OnRelease
  491.                     Do "ResetColors"
  492.                     Do "Quit"
  493.                 EndScript
  494.                 AfterAttachment
  495.                     DrawBorder WinW-81,WinH-(5+AY1),58,13,OUTLINE ,1,1
  496.                 EndScript
  497.             EndObj
  498.             AreaProp "Prop_R"
  499.                 Definition
  500.                     Origin 27,WinH-(53+AY1)
  501.                     Size WinW-74,9
  502.                     MoveType HORIZONTAL 
  503.                     Range 0,255,1,10
  504.                     VisibleRange 1,1
  505.                     InitialPosition 1,1
  506.                     PropBorder No
  507.                     Image "Prop-a.br"
  508.                     AltImage "Prop-b.br"
  509.                 EndScript
  510.                 OnNewPosition
  511.                     GetPropPosition "Prop_R",NewPos
  512.                     GetRGB PenA,Red,Green,Blue
  513.                     SetRGB PenA,NewPos,Green,Blue
  514.                     Do "PrintPropPos"
  515.                 EndScript
  516.                 OnRelease
  517.                     Do "PropRelease"
  518.                 EndScript
  519.                 AfterAttachment
  520.                     DrawBorder 26,WinH-(54+AY1),WinW-74,11,DOUBLEBEVEL ,2,1
  521.                 EndScript
  522.             EndObj
  523.             AreaProp "Prop_G"
  524.                 Definition
  525.                     Origin 27,WinH-(36+AY1)
  526.                     Size WinW-74,9
  527.                     MoveType HORIZONTAL 
  528.                     Range 0,255,1,10
  529.                     VisibleRange 1,1
  530.                     InitialPosition 1,1
  531.                     PropBorder No
  532.                     Image "Prop-a.br"
  533.                     AltImage "Prop-b.br"
  534.                 EndScript
  535.                 OnNewPosition
  536.                     GetPropPosition "Prop_G",NewPos
  537.                     GetRGB PenA,Red,Green,Blue
  538.                     SetRGB PenA,Red,NewPos,Blue
  539.                     Do "PrintPropPos"
  540.                 EndScript
  541.                 OnRelease
  542.                     Do "PropRelease"
  543.                 EndScript
  544.                 AfterAttachment
  545.                     DrawBorder 26,WinH-(37+AY1),WinW-74,11,DOUBLEBEVEL ,2,1
  546.                 EndScript
  547.             EndObj
  548.             AreaProp "Prop_B"
  549.                 Definition
  550.                     Origin 27,WinH-(19+AY1)
  551.                     Size WinW-74,9
  552.                     MoveType HORIZONTAL 
  553.                     Range 0,255,1,10
  554.                     VisibleRange 1,1
  555.                     InitialPosition 1,1
  556.                     PropBorder No
  557.                     Image "Prop-a.br"
  558.                     AltImage "Prop-b.br"
  559.                 EndScript
  560.                 OnNewPosition
  561.                     GetPropPosition "Prop_B",NewPos
  562.                     GetRGB PenA,Red,Green,Blue
  563.                     SetRGB PenA,Red,Green,NewPos
  564.                     Do "PrintPropPos"
  565.                 EndScript
  566.                 OnRelease
  567.                     Do "PropRelease"
  568.                 EndScript
  569.                 AfterAttachment
  570.                     DrawBorder 26,WinH-(20+AY1),WinW-74,11,DOUBLEBEVEL ,2,1
  571.                 EndScript
  572.             EndObj
  573.             TextMenu "Load"
  574.                 Definition
  575.                     AttachTo MENU ,"Project..."
  576.                     Text "Load..."
  577.                     ShortCutKey "L"
  578.                 EndScript
  579.                 Occurred
  580.                     SetFileRequestMode REGULARMODE ,REJECTICONS PATTERNFIELD 
  581.                     SetFileRequestPattern "#?.Prefs"
  582.                     Let FileName=AskForFileName(TheCurrentDirectory||".Prefs","Select Palette To Load...")
  583.                     If FileOf(FileName)<>Nothing
  584.                         ShowPalette FileName
  585.                     EndIf
  586.                 EndScript
  587.             EndObj
  588.             TextMenu "About"
  589.                 Definition
  590.                     AttachTo MENU ,"Project..."
  591.                     Text "About..."
  592.                 EndScript
  593.                 Occurred
  594.                     WorkWithDocument "TEMP"
  595.                     Clear DOCUMENT 
  596.                     Type "Palette Deck Version 0.9",NEWLINE 
  597.                     Type "By Thomas R. Grant",NEWLINE
  598.                     Type "tgrant@merlin.net.au",NEWLINE
  599.                     Type "http://arthur.merlin.net.au/~tgrant/",NEWLINE
  600.                     Local ©=AskForResponse(TextFromDocument("TEMP"),"about Palette Deck")
  601.                 EndScript
  602.             EndObj
  603.             Resource "Pub"
  604.                 NoAttach
  605.                 Memo "Screens"
  606.                     Definition
  607.                         MemoDocument "PubScreens"
  608.                         ScrollBars RIGHT 
  609.                         InputStyle LOCKEDOUT 
  610.                         Origin 10,WinH-(55+AY1)
  611.                         Size WinW-34,47
  612.                         Border INVERT BEVEL 
  613.                         Font "topaz",8
  614.                     EndScript
  615.                     OnRelease
  616.                         WorkWithDocument "PubScreens"
  617.                         Let Name=GetWord(TheLine,1)
  618.                         If PubScreenExists(Name)
  619.                             Let THEPUBSCREENTITLE=Name
  620.                             If ObjectAttached("OBJECTS")
  621.                                 DetachObject "PROGRAM"
  622.                                 AttachObject "PROGRAM"
  623.                             EndIf
  624.                         EndIf
  625.                     EndScript
  626.                 EndObj
  627.             EndObj
  628.         EndObj
  629.     EndObj
  630. EndObj
  631.